package Chapter04.Model;


public class PC {
    CPU cpu;
    HardDisk HD;
    public void setCPU(CPU cpu) {
        this.cpu = cpu;
    }
    public void setHardDisk(HardDisk HD) {
        this.HD = HD;
    }
    public void show(){
        System.out.println("CPU的速度为:"+cpu.getSpeed());
        System.out.println("硬盘的容量为:"+HD.getAmount());
    }
}

